import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;


public class Frame extends JFrame{
	
	public static String title = "Tower Defense Alpha"; 
	public static Dimension size = new Dimension(700, 550); //set frame size

	public Frame() //constructor
	{
		setTitle(title); //set title 
		setSize(size); //set size via Dimension Width Height
		setResizable(false); //static frame
		//setLocationRelativeTo(null);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //close window
		
		init();
		
	}
	
	
	
	public void init() // to change applet
	{
		BlockToolbar btoolbar = new ForestToolbar();
		Window screen = new Window();
		btoolbar.addObserver(screen);
		JToolBar toolbar = btoolbar.getToolbar();
		setLayout(new GridBagLayout());

		GridBagConstraints c = new GridBagConstraints();

		boolean shouldWeightX = true;
		if(shouldWeightX)
		{
		c.weightx = .5;
		}
		c.fill = GridBagConstraints.VERTICAL;
		c.gridx = 0;
		c.gridy = 0;

		add(toolbar,c);



		c.weightx = 0;
		c.fill = GridBagConstraints.NONE;
		c.ipadx = 700;
		c.ipady = 450;
		c.gridx = 0;
		c.gridy = 1;
		add(screen, c);
		
		setVisible(true);
		
		
		
		
		
		
	}
	
	
	
	/*public static void main(String args[])
	{
		Frame frame = new Frame(); //initialize Frame
		
		
	
		
	}
	*/
	
	
	
	
}
